﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;
using Cloudix.Common;

namespace System.Web.Mvc
{
    public static class HtmlExtensions
    {

        /// <summary>
        /// Returns the basic literal value without any (Html) markup.
        /// </summary>
        public static string RenderRawContent(this HtmlHelper html, string id)
        {
            return RenderRawContent(html, Guid.Parse(id));
        }

        /// <summary>
        /// Returns the basic literal value without any (Html) markup.
        /// </summary>
        public static string RenderRawContent(this HtmlHelper html, Guid contentId)
        {
            return CloudixScriptManager.RenderRawContent(contentId);
        }

        /// <summary>
        /// Renders the value with Cloudix' default Html markup and injects it into the HttpResponse.
        /// </summary>
        public static void RenderHtmlContent(this HtmlHelper html, string id)
        {
            RenderHtmlContent(html, Guid.Parse(id));
        }

        /// <summary>
        /// Renders the value with Cloudix' default Html markup and injects it into the HttpResponse.
        /// </summary>
        public static void RenderHtmlContent(this HtmlHelper html, Guid contentId)
        {
            CloudixScriptManager.RenderHtmlContent(contentId);
        }



    }
}
